package com.leil.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.leil.config.ServiceConfig;

@RestController
public class UserController {
	
	
	@Value("${server.port}")
	private String serverPort;
	
	@Autowired
	private ServiceConfig serviceConfig;
	
	@RequestMapping(value="/usertest",method = RequestMethod.GET)
    public String userTest() {
		return serviceConfig.getProperty();
    }
	
	@RequestMapping(value="/pwd", method = RequestMethod.GET)
	public String pwd(@RequestParam String name) {
		return serviceConfig.getPwd() + "ServerPort : " + serverPort + " Hello : " + name;
	}
	
	@RequestMapping(value = "/zuultest", method = RequestMethod.GET)
	public String zuulTest() {
		return "zuulTest0";
	}
	

}
